package org.muninn.niagara.structures;

import javax.baja.sys.BBoolean;
import javax.baja.sys.BObject;
import javax.baja.sys.BValue;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;

public class BBoolMode extends BObject implements BMode
{
  private String name;
  private int number;
  private BBoolean value;
  
  public BBoolMode(String name, String number, String value)
  {
    this.name = name;
    this.number = Integer.parseInt(number);
    this.value = BBoolean.make(value.equals("true"));
  }

  public void setNumber(int number) { this.number = number; }

  public int getNumber() { return this.number; }

  public void setName(String name) { this.name = name; }

  public String getName() { return name; }

  public void setValue(BValue value) { this.value = (BBoolean) value; }

  public BValue getValue() { return this.value; }
  
  public static final Type TYPE = Sys.loadType(BBoolMode.class);
  public Type getType() { return TYPE; }
}
